package com.zzedu.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.zzedu.common.annotation.Excel;
import jakarta.validation.constraints.NotBlank;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 单词管理对象 zz_thesaurus_words
 * 
 * @author Mr.Wang
 * @date 2025-01-29
 */
@TableName("zz_thesaurus_words")
public class ZzThesaurusWords implements Serializable
{
    private static final long serialVersionUID = 1L;

    /** id */
    @TableId(type = IdType.AUTO)
    private Long id;

    /** 单词 */
    @Excel(name = "单词")
    @NotBlank(message = "单词不能为空")
    private String word;
    /***
     * 类型
     * 1-单词 2-音频 3-句子
     */
    private Integer wordType;

    /**
     * 唯一KEy
     */
    private String keyData;
    /** 音标 */
    @Excel(name = "音标")
    private String phonetic;

    /** 添加时间 */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime gmtCreate;

    /** 更新时间 */
    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime gmtModify;

    /** 逻辑删除(0：未删除 1：id) */
    @TableLogic(delval = "id")
    @TableField(fill = FieldFill.INSERT)
    private Integer deleted;
    /**
     * 是否上线
     */
    private Integer onLineFlag;


    /**
     * 首字母
     */
    private String initial;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.UPDATE)
    private Long updateBy;
    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setWord(String word) 
    {
        this.word = word;
    }

    public String getWord() 
    {
        return word;
    }
    public void setPhonetic(String phonetic) 
    {
        this.phonetic = phonetic;
    }

    public String getPhonetic() 
    {
        return phonetic;
    }
    public void setGmtCreate(LocalDateTime gmtCreate)
    {
        this.gmtCreate = gmtCreate;
    }

    public LocalDateTime getGmtCreate() 
    {
        return gmtCreate;
    }
    public void setGmtModify(LocalDateTime gmtModify) 
    {
        this.gmtModify = gmtModify;
    }

    public LocalDateTime getGmtModify() 
    {
        return gmtModify;
    }
    public void setDeleted(Integer deleted) 
    {
        this.deleted = deleted;
    }

    public Integer getDeleted() 
    {
        return deleted;
    }

    public Integer getOnLineFlag() {
        return onLineFlag;
    }

    public void setOnLineFlag(Integer onLineFlag) {
        this.onLineFlag = onLineFlag;
    }

    public Integer getWordType() {
        return wordType;
    }

    public void setWordType(Integer wordType) {
        this.wordType = wordType;
    }

    public String getKeyData() {
        return keyData;
    }

    public void setKeyData(String keyData) {
        this.keyData = keyData;
    }

    public String getInitial() {
        return initial;
    }

    public void setInitial(String initial) {
        this.initial = initial;
    }

    public Long getCreateBy() {
        return createBy;
    }

    public void setCreateBy(Long createBy) {
        this.createBy = createBy;
    }

    public Long getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(Long updateBy) {
        this.updateBy = updateBy;
    }

    @Override
    public String toString() {
        return  ToStringBuilder.reflectionToString(this,ToStringStyle.JSON_STYLE);
    }
}
